﻿

namespace Simple.Services
{
    public class LeaveMessageInputModel : ModelBase
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        /// 留言内容
        /// </summary>
        [Required(ErrorMessage = "留言内容不能为空")]
        public string? LeaveMessageContent { get; set; }

        /// <summary>
        /// 班级动态Id
        /// </summary>
        public Guid? ClassDynamicId { get; set; }

        /// <summary>
        /// 留言时间
        /// </summary>
        public DateTime? LeaveMessageTime { get; set; }

        /// <summary>
        /// 留言人id
        /// </summary>
        public string? LeaveMessageUserId { get; set; }

        /// <summary>
        /// 留言人姓名
        /// </summary>
        public string? LeaveMessageUserName { get; set; }

        /// <summary>
        /// 留言人图片Id
        /// </summary>
        public string? LeaveMessageUserImageId { get; set; }

        /// <summary>
        /// 所在班级id
        /// </summary>
        public Guid? ClassId { get; set; }

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<ClassDynamicLeaveMessage, LeaveMessageInputModel>();

            profile.CreateMap<LeaveMessageInputModel, ClassDynamicLeaveMessage>();

        }
    }

    public class IsPublishDto
    {
        /// <summary>
        /// 留言id
        /// </summary>
        public string? LeaveMessageId { get; set; }

        /// <summary>
        /// 班级Id
        /// </summary>
        public bool IsPublish { get; set; }
    }
}
